package com.wx.service;

import com.wx.common.SecurityUser;
import com.wx.domain.dto.AuthUserDto;
import com.wx.domain.vo.MenuTreeVo;
import com.wx.entity.SysMenu;

import java.util.List;

/**
 * <p>Title:      SysMenuService. </p>
 * <p>Description 菜单service </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    http://www.xinglinglove.com </p>
 *
 * @author <a href="xinglinglove1029@163.com"/>杨文生</a>
 * @since 2018 /1/16 14:50
 */
public interface SysMenuService extends BaseService<SysMenu> {

    /**
     * <p>Title:     saveMenuInfo. </p>
     * <p>Description 保存菜单信息</p>
     *
     * @param menu        the menu
     * @param authUserDto the auth user dto
     * @return int int
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 10:46
     */
    int saveMenuInfo(SysMenu menu, AuthUserDto authUserDto);

    /**
     * <p>Title:    modifyMenu. </p>
     * <p>Description 修改菜单信息</p>
     *
     * @param menu        the menu
     * @param authUserDto the auth user dto
     * @return int int
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 10:46
     */
    int modifyMenu(SysMenu menu, AuthUserDto authUserDto);

    /**
     * <p>Title:     disableMenuById. </p>
     * <p>Description 禁用菜单信息</p>
     *
     * @param id          the id
     * @param authUserDto the auth user dto
     * @return int int
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 10:46
     */
    int disableMenuById(String id, AuthUserDto authUserDto);

    /**
     * <p>Title:     enableMenuById. </p>
     * <p>Description 启用菜单信息</p>
     *
     * @param id          the id
     * @param authUserDto the auth user dto
     * @return int int
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 10:46
     */
    int enableMenuById(String id, AuthUserDto authUserDto);

    /**
     * <p>Title:     deleteMenuById. </p>
     * <p>Description 根据id删除菜单信息</p>
     *
     * @param id          the id
     * @param authUserDto the auth user dto
     * @return int int
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 10:46
     */
    int deleteMenuById(String id, AuthUserDto authUserDto);

    /**
     * <p>Title:     getMenuTree. </p>
     * <p>Description 查询菜单树</p>
     *
     * @return menu tree
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 11:55
     * @param menuId
     */
    List<MenuTreeVo> getMenuTree(String menuId);

    /**
     * <p>Title:     getMenuById. </p>
     * <p>Description 根据菜单id查询菜单信息</p>
     *
     * @param menuId the menu id
     * @return menu by id
     * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since 2018 /4/27 18:23
     */
    SysMenu getMenuById(String menuId);

    /**
     * <p>Title:      getMenuTreeByUserId. </p>
     * <p>Description 查询当前登录人拥有的菜单树</p>
     *
     * @return       List<MenuTreeVo>
     * @Author        <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since     2019/4/15 12:01
     */
    List<MenuTreeVo> getMenuTreeByUserId(SecurityUser securityUser);

    /**
     * <p>Title:      getOwnMenuModule. </p>
     * <p>Description 查询当前登录人拥有的模块</p>
     *
     * @param       roleIds  List<String>
     * @return       List<MenuTreeVo>
     * @Author        <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since     2019/4/15 12:01
     */
    List<SysMenu> getOwnMenuModule(List<String> roleIds);

    /**
     * <p>Title:      getMenuTreeIncludeSelf. </p>
     * <p>Description 查询子节点</p>
     *
     * @param       menuId  String
     * @return       List<MenuTreeVo>
     * @Author        <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since     2019/4/15 12:01
     */
    MenuTreeVo getMenuTreeIncludeSelf(String menuId);

    /**
     * <p>Title:      queryAllMenu. </p>
     * <p>Description 查询所有菜单</p>
     *
     * @return       List<MenuTreeVo>
     * @Author        <a href="xinglinglove1029@163.com"/>杨文生</a>
     * @since     2019/4/15 12:01
     */
    List<SysMenu> queryAllMenu();
}